#  author:张靖昆 date:2020/3/6 name:7_匿名函数使用 IDE:PyCharm
goods= [  {'id':'001',"user_name":'admin','user_password':'888','age':20},
    {'id':'002',"user_name":'joke','user_password':'888','age':21},
    {'id':'003',"user_name":'nose','user_password':'888','age':11}
]
# goods.sort()

def sort_by_price(good):
    return good['age']
goods.sort(key=sort_by_price)
print(goods)

# arr=[1,3,2,4]
# arr.sort()
# print(arr)
# chs=['中','国','人']
# chs.sort()
# print(chs)
